Optimal. Leaf size=140 \[ \frac{b \left (6 a^2+b^2 \left (n^2-3 n+2\right )\right ) (a+b \tan (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{b \tan (c+d x)}{a}+1\right )}{6 a^4 d (n+1)}+\frac{b (2-n) \cot ^2(c+d x) (a+b \tan (c+d x))^{n+1}}{6 a^2 d}-\frac{\cot ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12994, antiderivative size = 140, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3516, 950, 78, 65} \[ \frac{b \left (6 a^2+b^2 \left (n^2-3 n+2\right )\right ) (a+b \tan (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{b \tan (c+d x)}{a}+1\right )}{6 a^4 d (n+1)}+\frac{b (2-n) \cot ^2(c+d x) (a+b \tan (c+d x))^{n+1}}{6 a^2 d}-\frac{\cot ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{3 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 950
Rule 78
Rule 65
Rubi steps
\begin{align*} \int \csc ^4(c+d x) (a+b \tan (c+d x))^n \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n \left (b^2+x^2\right )}{x^4} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{\cot ^3(c+d x) (a+b \tan (c+d x))^{1+n}}{3 a d}-\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n \left (b^2 (2-n)-3 a x\right )}{x^3} \, dx,x,b \tan (c+d x)\right )}{3 a d}\\ &=\frac{b (2-n) \cot ^2(c+d x) (a+b \tan (c+d x))^{1+n}}{6 a^2 d}-\frac{\cot ^3(c+d x) (a+b \tan (c+d x))^{1+n}}{3 a d}-\frac{\left (b \left (-6 a^2+b^2 (2-n) (-1+n)\right )\right ) \operatorname{Subst}\left (\int \frac{(a+x)^n}{x^2} \, dx,x,b \tan (c+d x)\right )}{6 a^2 d}\\ &=\frac{b (2-n) \cot ^2(c+d x) (a+b \tan (c+d x))^{1+n}}{6 a^2 d}-\frac{\cot ^3(c+d x) (a+b \tan (c+d x))^{1+n}}{3 a d}+\frac{b \left (6 a^2+b^2 (1-n) (2-n)\right ) \, _2F_1\left (2,1+n;2+n;1+\frac{b \tan (c+d x)}{a}\right ) (a+b \tan (c+d x))^{1+n}}{6 a^4 d (1+n)}\\ \end{align*}
Mathematica [A] time = 1.24389, size = 78, normalized size = 0.56 \[ \frac{b (a+b \tan (c+d x))^{n+1} \left (a^2 \, _2F_1\left (2,n+1;n+2;\frac{b \tan (c+d x)}{a}+1\right )+b^2 \, _2F_1\left (4,n+1;n+2;\frac{b \tan (c+d x)}{a}+1\right )\right )}{a^4 d (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.229, size = 0, normalized size = 0. \begin{align*} \int \left ( \csc \left ( dx+c \right ) \right ) ^{4} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \tan \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{4}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]